1. Field of the Invention
The present invention relates to a high precision position detecting apparatus capable of removing error caused by an offset in a signal from a position sensor outputting two signals which periodically vary in correspondence with measured displacement and differ 90xc2x0 in phase, or by an amplitude difference or a phase difference between the two signals.
2. Description of the Related Art
Generally, when a movable unit or the like of a machine tool is moved, not only is positional control based on position information detected by a position detecting apparatus performed, but speed feedback control of an electric motor based on speed information derived from a difference in the position information is also performed. There has especially been a trend to increase a loop gain of the speed feedback in order to improve the response characteristics of a machine. The above-described conventional position detecting apparatus can remove an offset or an amplitude difference contained in output of a position sensor immediately after manufacture, but error caused by a change of an offset or an amplitude difference with the passage of a time after manufacture or by the installation environment of the position sensor cannot be removed. In other words, after the position detecting apparatus is manufactured, the offset or the amplitude difference generates a delicate change due to variations in the ambient temperature, changes in the components of the position sensor, leakage magnetic flux generated by an electric motor having the position detecting apparatus incorporated therein, and the like.
Furthermore, in the conventional position detecting apparatus, a generally used method of measuring the offset value or the amplitude correction value at the time of manufacture is to measure the maximum value and the minimum value of the output signal from the position sensor and derive the offset value and the amplitude value from the average thereof and the difference therebetween. Alternatively, as disclosed in Japanese Patent Laid-Open Publication No. Hei 5-256638, the offset value and the amplitude value can be derived from position sensor output signal values from a plurality of positions satisfying a specific condition. Because values of the position sensor output signal at a specific position are used in these methods, the methods are likely to be influenced by noise, waveform distortion, or the like, and there remains a problem that the offset and amplitude correction values cannot be precisely measured at the time of manufacture of the position detecting apparatus.
Ordinarily, influence exerted on the machining accuracy of a machine tool by a change of the offset, the amplitude difference, or the phase difference over time, or by measurement error at the time of shipment is, for practical purposes, negligibly small. However, because the position detecting error caused by such error becomes an error having a cycle equal to or twice that of the error of output signal of the position sensor, a frequency of speed ripple caused by the error and a machinery resonance frequency may, depending on the moving speed of the movable unit, coincide with each other and generate an irregular sound at the resonance position. In particular, because the irregular sound increases in proportion to the loop gain of the speed feedback and loop gain therefore cannot be increased, mechanical performance deteriorates. This problem is common also with optical type or magnetic type encoders in addition to a conventionally used resolver, whenever a position is derived by interpolation processing from two signals which periodically vary in correspondence with measured displacement and which differ 90xc2x0 in phase.
The present invention was conceived to solve the above-described problems, and an object thereof is to provide a high precision position detecting apparatus capable of reducing periodic position detecting error caused by change in an offset, an amplitude difference or a phase difference over the passage of time or by installation environment, which is contained in an output signal of a position sensor having, as output, a plurality of signals which periodically vary in correspondence with measured displacement and respectively differ in phase, for improvement of the response characteristics of a movable unit of a machine tool or the like.
In the following, FIG. 2 is a block diagram showing an example of a position detecting apparatus. In FIG. 2, a position sensor 1 is a one-phase excitation two-phase output type resolver, which outputs a multiple of 100 times a rotational angle xcex8 of the input shaft of the position sensor. Namely, when an input shaft is rotated, an excitation signal is amplitude modulated to a sine value and cosine value of a rotation quantity by the resolver, and signals AS and AC amplified by amplifiers 2 and 3 are output. In the example shown in FIG. 2, frequency of the excitation signal is 50 KHz, and, if the rotation angle of the input shaft of the position sensor 1 is set as xcex8 and the amplitude of the output signal is set as G, the signals AS and AC can be expressed by the following formulas 1 and 2:
AS=Gxc2x7Sin (100xcex8) Sin (2xc2x7xcfx80xc2x750000xc2x7txe2x80x83xe2x80x83. . . (1) 
AC=Gxc2x7Cos (100xcex8) Sin (2xc2x7xcfx80xc2x750000xc2x7txe2x80x83xe2x80x83. . . (2) 
These signals AS and AC are sampled and digitized by a pulse signal TIM of a period of 20 xcexcS output in synchronism with the excitation signal from a timing controller 13 at a timing of Sin (100000xcfx80t)=1 by respective AD converters 4 and 5, and converted into values DS and DC, respectively. Consequently, the values DS and DC can be expressed by formulas 3 and 4 below, respectively, and the output of the position sensor can be regarded as two signals which periodically vary in correspondence with the measured displacement xcex8 and differ 90xc2x0 in phase each other, the formulas being:
DS=Gxc2x7Sin (100xcex8)xe2x80x83xe2x80x83. . . (3) 
DC=Gxc2x7Cos (100xcex8)xe2x80x83xe2x80x83. . . (4) 
Because in actual practice the above-described digitized two values DS and DC contain an offset voltage and an amplitude difference due to product dispersion of the position sensor, or a signal amplifier, the above-described formulas 3 and 4 are more exactly expressed by the following formulas 5 and 6:
DS=Bxc2x7Gxc2x7Sin (100xcex8)+SOFxe2x80x83xe2x80x83. . . (5) 
DC=Gxc2x7Cos (100xcex8)+COFxe2x80x83xe2x80x83. . . (6) 
These offset values SOF, COF and an amplitude correction value BAJ (=1/B) representing the amplitude ratio between two signals contained in these values DS and DC are measured at the time of manufacture of the position detecting apparatus, stored in a nonvolatile memory or the like in the position detecting apparatus, and set in respective memories 6, 7, and 10 prior to performance of position detection. In subtraction devices 8 and 9, the offset values SOF and COF stored in the memories 6 and 7 are subtracted from the values DS and DC, respectively, to create values DSA and DCA. The value DSA is further multiplied by a multiplier 11 with the amplitude correction value BAJ stored in the memory 10 to become a value DSB of an amplitude which is approximately equal to that of the value DCA.
The values DSB and DCA are subjected to inverse tangent calculation with two variables as input by an interpolation calculator 12 and converted into a position signal POS representing a rotation quantity within 1/100th of one rotation of the input shaft of the position sensor 1. Then, although not shown in the drawing, in an actual position detecting apparatus, position data of at least more than one rotation of the input shaft of the position sensor 1 is derived by incremental processing or the like based on the change of the position signal POS.
It should again be noted that, even after the manufacture of the position detecting apparatus, offset and amplitude differences are generated as a result of variation of ambient temperature, replacement of components comprising the position sensor, leakage magnetic flux generated by an electric motor having the position detecting apparatus incorporated therein, or the like. Removal of the offset or the amplitude error due to the passage of a time or the installation environment as such is not possible with the position detecting apparatus shown in FIG. 2.
Furthermore, in the example shown in FIG. 2, a minimal phase error for 90xc2x0 phase difference between the two signals of the position sensor output signal, and this minimal phase error cannot be corrected with high precision at the time of manufacture of the position detecting apparatus.
According to the position detecting apparatus of the present invention, the periodical position detecting error generated by the change of the offset value, the amplitude difference, phase difference, or the like of the position sensor output signal with the passage of a time, which has conventionally been a problem, can be automatically and reliably reduced. Moreover, because the offset value, the amplitude correction value, or the phase correction value is automatically derived based on position sensor output signals at a plurality of positions, values less susceptible to influence of signal noise or waveform distortion can be precisely detected. Thereby high precision position detection is made possible, and the response characteristics of the movable unit of a machine tool or the like can thus be improved.
The present invention relates to a position detecting apparatus for converting an output from a position sensor which outputs two signals which periodically vary in correspondence with measured displacement and which differ 90xc2x0 in phase, into position information, and the above-described object of the present invention is achieved by configuring an offset memory, an offset remover for removing an offset value stored in the offset memory from two output values of a position sensor, an interpolation calculator for converting the two output values from the offset remover into a position signal, a signal memory for storing the two output values of the position sensor, a distance calculator for calculating the displacement based on the two output values of the position sensor, a signal integrator for integrating the two output values of the position sensor and an output value of the distance calculator, an offset value calculator for calculating offset values based on the two output values of the signal integrator and the output value of the distance calculator, and an offset value setting device for setting the output values of the offset value calculator in the offset memory, after each period change of the position sensor output signal.
Furthermore, the above-described object of the present invention is also achieved by configuring an offset memory, an offset remover for removing an offset value stored by the offset memory from two output values of a position sensor, an interpolation calculator for converting the two output values of the offset remover into a position signal, a signal memory for storing the two output values of the position sensor, a distance calculator for calculating a square of a difference of the stored value of the signal memory with respect to each of the two output values and for calculating a square root of a value derived by adding the two values after the squaring calculations, a distance integrator for integrating the output value of the distance calculator, a signal multiplier for multiplying the two output values of the position sensor by the output value of the distance calculator, a signal integrator for integrating the two output values of the signal multiplier, an instructor for issuing a storage instruction and an integration instruction to the signal memory and the signal integrator, respectively, when the output value of the distance calculator exceeds a fixed value, a divider for dividing the two output values of the signal integrator by the output value of the distance integrator, and an offset value setting device for setting the two output values of the divider in the offset memory, after each period change of the position sensor output signal.
Furthermore, the above-described object of the present invention may also be achieved by configuring an amplitude correction value memory for storing an amplitude correction value, an amplitude corrector for correcting the signal amplitude of one output signal of a position sensor in accordance with the amplitude correction value stored in the amplitude correction value memory, an interpolation calculator for converting another output value of the position sensor and the output value of the amplitude corrector into a position signal, a signal memory for storing the two output values of the position sensor, a distance calculator for calculating a displacement(distance moved)based on the two output values of the position sensor, a positive number converter for converting the two output values of the position sensor into positive numbers, a converted positive number integrator for integrating the two output values of the positive number converter and the output value of the distance calculator, an amplitude correction value calculator for calculating an amplitude correction value based on the output value of the converted positive number integrator and the output value of the distance calculator, and an amplitude correction value setting device for setting the output value of the amplitude correction value calculator in the amplitude correction value memory, after each one half the period change of the position sensor output signal.
Furthermore, the above-described object of the present invention may still further be achieved by configuring an amplitude correction value memory for storing an amplitude correction value, an amplitude corrector for correcting the signal amplitude of one of the output signals of the position sensor in accordance with the amplitude correction value stored in the amplitude correction value memory, an interpolation calculator for converting another of the output values of the position sensor and the output value of the amplitude corrector into a position signal, a signal memory for storing the two output values of the position sensor, a distance calculator for calculating a square of a difference of the stored value of the signal memory with respect to each the two output values of the position sensor and for calculating a square root of a value derived by adding the two values after the squaring calculations, a distance integrator for integrating the output value of the distance calculator, a positive number converter for calculating a product of the output value of the distance calculator and each of the squared output values of the position sensor, a converted positive number integrator for integrating the two output values of the positive number converter, an instructor for issuing a storage instruction to the signal memory and an integration instruction to the converted positive number integrator when the output value of the distance calculator exceeds a fixed value, an amplitude correction value calculator for calculating an amplitude correction value from the output values of the distance integrator and the converted positive number integrator, and an amplitude correction value setting device for setting the output value of the amplitude correction value calculator in the amplitude correction value memory, after each one half the period change of the position sensor output signal.
Furthermore, the above-described object of the present invention may also be achieved by configuring a phase difference correction value memory for storing a phase difference correction value, a phase corrector for correcting one signal phase of one of the output signals of a position sensor in accordance with the phase difference correction value stored in the phase difference correction value memory and another of the output signals of the position sensor, an interpolation calculator for converting one of the output values of the position sensor and the output value of the phase corrector into a position signal, a signal memory for storing the two output values of the position sensor, a distance calculator for calculating a displacement based on the two output values of the position sensor, a correlation calculator for multiplying the two output values of the position sensor by the output value of the distance calculator, a correlation integrator for integrating the output value of the correlation calculator and the output value of the distance calculator, a phase difference correction value calculator for calculating the phase difference correction value based on the output value of the correlation integrator and the output value of the distance calculator, and a phase correction value setting device for setting the output value of the phase difference correction value calculator in the phase correction value memory, after each one half period change of the position sensor output signal.
Moreover, the above-described object of the present invention is achieved by configuring a phase difference correction value memory for storing a phase difference correction value, a phase corrector for correcting one signal phase of one of the output signals of a position sensor in accordance with the phase difference correction value stored by the phase difference correction value memory and another of the output signals of the position sensor, an interpolation calculator for converting one output value of the position sensor and the output value of the phase corrector into a position signal, a signal memory for storing two output values of the position sensor, a distance calculator for calculating a square of a difference of the stored value of the signal memory with respect to each of the two output values of the position sensor and for calculating a square root of a value derived by adding the two values after the squaring calculations, a distance integrator for integrating the output value of the distance calculator, a correlation calculator for multiplying a product of the two output values of the position sensor by the output value of the distance calculator, a correlation integrator for integrating the output value of the correlation calculator, an instructor for issuing a storage instruction to the signal memory and an integration instruction to the correlation integrator, when the output value of the distance calculator exceeds a fixed value, a phase difference correction value calculator for calculating the phase difference correction value from the output values of the distance calculator and the correlation integrator, and a phase correction value setting device for setting the output value of the phase difference correction value calculator in the phase correction value memory, after each one half period change of the position sensor output signal.
In the position detecting apparatus according to the present invention, the offset value, the amplitude correction value, and the phase correction value of the position sensor output signal are automatically derived utilizing signals output by the position sensor at a plurality of positions. The offset value, the amplitude correction value, and the phase correction value, are therefore less susceptible to the influence of a signal noise or waveform distortion and can be precisely detected. By correcting the position sensor output signal with these values, high precision position detection is possible.